{  Statement: http://acmp.ru/?main=task&id_task=204
   Verdict: Accepted
}
uses
  SysUtils, Math;

var
  n:longint;
  p:array[1..50010] of longint;
  s:string;

procedure prefix();

var
  m,k,q:longint;
  
begin
fillchar(p,sizeof(p),0);
m := length(s);
p[1] := 0;
k := 0;
for q:=2 to m do begin
  while (k > 0) and (s[k+1] <> s[q]) do k := p[k];
  if s[k+1] = s[q] then inc(k);
  p[q] := k;
end;
end;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
n := length(s);
prefix();
write(n - p[n]);
end.
